package cloud.simple.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cloud.simple.service.conf.DataSourceProperties;

@SpringBootApplication
@RestController
public class ClientApp {
    @Autowired
    DataSourceProperties dataSourceProperties;

    @RequestMapping("/")
    String hello() {
        return "Hello " + dataSourceProperties.getUrl() + "!";
    }

    public static void main(String[] args) {
        SpringApplication.run(ClientApp.class, args);
    }
}

